package org.brakepedal.server.support.http;

/**
 * Date: 2023/2/11 20:03

 
 */
public class ExceptionResponseBody extends AbsResponseBody {
    private String stack;

    {
        setCode(ResponseBodyCode.BAD_REQUEST);
        setStatus(ResponseBodyStatus.ERROR);
    }

    public String getStack() {
        return stack;
    }

    public ExceptionResponseBody setStack(String stack) {
        this.stack = stack;
        return this;
    }

    public static AbsResponseBody getBody(ResponseBodyMsg msg, String stack) {
        return new ExceptionResponseBody().setStack(stack).setMsg(msg);
    }
}
